/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */

//  定义验证规则
export function validMobile(data) {
  const Pattern = /^1[3-9]\d{9}$/
  return Pattern.test(data)
}

export function validPassword(data) {
  return data.length >= 6 && data.length <= 16
}
